#{extends 'CRUD/layout.html' /}
<script type="text/javascript" src="@{'/tinymce/jscripts/tiny_mce/jquery.tinymce.js'}"></script>

<div id="crudBlank"> 
	
	<h2 id="crudBlankTitle">Add Post</h2> 
	#{ifErrors}
			#{errors}
        <p class="error">
            ${error}
        </p>
      #{/errors}
    #{/ifErrors}
	<div class="objectForm">
	#{form action:@cpanel.admin.save(), enctype:'multipart/form-data'}
			<div class="crudField"> 
				<label for="object_title">标题</label> 
				<input id="object_title" class="" type="text" name="object.title" value="" size="50" />
				<span class="crudHelp"> Required.</span> 
			</div> 
			<div class="crudField"> 
				<label for="object_content">内容</label> 
				<textarea id="object_content" name="object.content" rows="15" cols="80" style="width: 60%" class="tinymce"></textarea> 
				<span class="crudHelp"> Required.</span> 
			</div> 
			<script type="text/javascript"> 
    		$().ready(function() {
					$('textarea.tinymce').tinymce({
						script_url : "@{'/tinymce/jscripts/tiny_mce/tiny_mce.js'}",
						theme : "advanced",
						// Theme options
						theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,styleselect,formatselect,fontselect,fontsizeselect",
						theme_advanced_buttons2 : "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor",
						theme_advanced_buttons3 : "hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,iespell,media,advhr,|,print",
						theme_advanced_toolbar_location : "top",
						theme_advanced_toolbar_align : "left",
						theme_advanced_statusbar_location : "bottom",
						theme_advanced_resizing : true
					});
				});
  		</script> 
			<div class="crudField"> 
 				<label for="object_status">状态</label> 
				<input id="object_status" class="" type="checkbox" name="object.status" value="true"  size="50" /> 
				<input type="hidden" name="object.status" value="false" /> 
			</div>
			<div class="crudField"> 
 				<label for="object_tags">标签</label> 
				<input id="object_tags" class="" type="text" name="tags" value="" size="50" /> 
			</div>
		<p class="crudButtons">
			<input type="submit" name="_save" value="保存" />

		</p>
	#{/form}
	</div>

</div>